package com.base.cn.platform.os.service.manage.op.groom;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 推荐位置
 * @author ll
 * @create 2018-05-07
 */
@FeignClient(name = BaseService.appName,configuration = FeignAuthConfig.class)
public interface OpGroomPlaceService extends BaseService {


    /**
     * 添加修改推荐位置
     * @param groomPlace
     * @return
     */
    @RequestMapping(contextPath + "/op/ajaxSaveUpdateGroomPlace")
    Map<String,Object> ajaxSaveUpdateGroomPlace(@RequestBody Map<String, Object> groomPlace);


    /**
     * 搜索ajax列表
     * @param groomPlace
     * @return
     */
    @RequestMapping(contextPath + "/op/queryAjaxGroomPlaceListPage")
    Map<String,Object> queryAjaxGroomPlaceListPage(@RequestParam("currentPage") Integer currentPage,
                                                   @RequestBody Map<String, Object> groomPlace);

    /**
     * 修改状态
     * @param groomPlaceIds
     * @param status
     * @return
     */
    @RequestMapping(contextPath + "/op/updateGroomPlaceStatusByIds")
    Map<String,Object> updateGroomPlaceStatusByIds(@RequestParam("groomPlaceIds") String groomPlaceIds,
                                                   @RequestParam("status") Integer status);

    /**
     * 推荐位置详情
     * @param id
     * @return
     */
    @RequestMapping(contextPath + "/op/groomPlaceInfo")
    Map<String,Object> groomPlaceInfo(@RequestParam("id") BigDecimal id);

    /**
     * 根据Id 查询推荐位置
     */
    @RequestMapping(contextPath + "/op/groomPlaceById")
    Map<String,Object> groomPlaceById(@RequestParam("id") BigDecimal id);

    /**
     * 后台批量推荐
     * @param dataType 类型
     * @param status 状态
     * @param isDataType  false 不搜索dataType null
     * @return
     */
    @RequestMapping(contextPath + "/op/queryOpGroomPlaceByDataType")
    List<Map<String,Object>> queryOpGroomPlaceByDataType(@RequestParam("dataType") String dataType,
                                                         @RequestParam("status") Integer status,
                                                         @RequestParam("isDataType") boolean isDataType);


}
